﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SQLite;

namespace SkypeCore
{
	public static class DatabaseConnection
	{
		private const string ConnectionString = "Data Source={0};Version=3;";

		public static SQLiteConnection Get(string databasePath)
		{
			var connection = new SQLiteConnection(string.Format(ConnectionString, databasePath));
			connection.Open();
			return connection;
		}

		public static bool TryToOpen(string databasePath)
		{
			var connection = new SQLiteConnection(string.Format(ConnectionString, databasePath));
			connection.Open();
			return true;
		}
	}
}
